package com.itheima.dao;

import com.itheima.pojo.Student;
import com.itheima.utils.XmlParserUtils;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public class StuDao implements StuDaoInter{
    public List<Student> listStudent(){
        String file = this.getClass().getClassLoader().getResource("stu.xml").getFile();
        List<Student> studentList = XmlParserUtils.parse(file, Student.class);
        return studentList;
    }
}
